import request from './requests.js'
import {
	receive_odd_url
} from "./setting.js"

import {
	Toast
} from 'vant'




export function receive_odd(operator_id, odd_id, callBack) {

	// console.log(receive_odd_url)
	return request({
		url: receive_odd_url,
		method: 'get',
		params: {
			operator_id: operator_id,
			odd_id: odd_id

		}
	}).then((response) => { //这里使用了ES6的语法
		console.log(response) //请求成功返回的数据
		let res = response.data.resultBody

		console.log(res)
		callBack(res)
	}).catch((error) => {
		// console.log(response)
		console.log(error) //请求失败返回的数据
		Toast('接口请求失败，请联系管理员！')
	})
}
export default receive_odd